# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Maintainer: coderobe <coderobe@archlinux.org>
# Contributor: Jason Chu <jason@archlinux.org>

pkgname=usbview
pkgver=3.0
pkgrel=3
pkgdesc="Display the topology of devices on the USB bus"
arch=('loong64' 'x86_64')
url="http://www.kroah.com/linux/usb/"
license=('GPL')
depends=('gtk3' 'desktop-file-utils')
makedepends=('pkg-config' 'imagemagick')
install=${pkgname}.install
source=("http://www.kroah.com/linux/usb/${pkgname}-${pkgver}.tar.gz")
md5sums=('0e65d4978b1ac54f3bc8608d86af3a44')
sha256sums=('e83f445b11d2ca7d6ac795e6c6c2f6254cde4d7a32feb1f01b16e2afcd22a960')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --localstatedir=/var
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make prefix="${pkgdir}/usr" \
       sysconfdir="${pkgdir}/etc" \
       localstatedir="${pkgdir}/var" install
}
